package fun.chutianshu;

public class Cow extends Pet implements ChangeLife{
    private int aHp;

    public Cow(String name, int hp, int aHp) {
        super(name, hp);
        this.aHp = aHp;
    }

    public Cow() {
        super();
    }

    public int getaHp() {
        return aHp;
    }

    public void setaHp(int aHp) {
        this.aHp = aHp;
    }

    @Override
    public void changeHp(Pet pet) {
        pet.setHp(pet.getHp()+this.aHp);
        System.out.println("奶牛"+this.getName()+"为"+pet.getName()+"加血"+this.aHp+"点，加血后生命为："+pet.getHp());
    }

    @Override
    public void Print() {
        System.out.println("这是一只奶牛："+getName()+",当前血量："+getHp());
    }

    @Override
    public void Play() {
        System.out.println("奶牛:"+getName()+"正在陪你玩....");
    }
}
